import random
class tool:
    def GenerateCardNumber(self):
        #为增加卡号随机性以及防止卡号重复，自定义生成函数
        #默认16为数
        CardNumber = ""
        #数据储存的盒子模型
        for i in range(1,16):
            #循环16次
            num = random.randint(1,100)
            #随机依据
            if 1 <= num < 10:
                CardNumber = f"{CardNumber}{1}"
            elif 10 <= num < 20:
                CardNumber = f"{CardNumber}{2}"
            elif 20 <= num < 30:
                CardNumber = f"{CardNumber}{3}"
            elif 30 <= num < 40:
                CardNumber = f"{CardNumber}{4}"
            elif 40 <= num < 50:
                CardNumber = f"{CardNumber}{5}"
            elif 50 <= num < 60:
                CardNumber = f"{CardNumber}{6}"
            elif 60 <= num < 70:
                CardNumber = f"{CardNumber}{7}"
            elif 80 <= num < 90:
                CardNumber = f"{CardNumber}{8}"
            elif 90 <= num < 100:
                CardNumber = f"{CardNumber}{9}"
            elif num == 100:
                CardNumber = f"{CardNumber}{0}"
        return int(CardNumber)